package com.dg.dao;

import com.dg.common.PageQuery;
import com.dg.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int countByDeptId(@Param("deptId") Integer deptId);

    List<User> getAllOrByDeptId(@Param("deptId") Integer deptId,@Param("pageQuery") PageQuery pageQuery);

    int findByName(@Param("id") Integer id, @Param("username") String username);

    List<User> getAll();

    User login(@Param("username") String username,@Param("password") String password);
}